#include <vector>
#include "base/cmd_flags.h"
#include "strings/split.h"
#include "gtest/gtest.h"

using std::vector;

TEST(SplitTest, SplitStringUsing) {
  vector<string> v;
  SplitStringUsing("", 'a', &v);
  EXPECT_EQ(0, v.size());
  SplitStringUsing("cd,ad", ',', &v);
  ASSERT_EQ(2, v.size());
  EXPECT_EQ("cd", v[0]);
  EXPECT_EQ("ad", v[1]);
  SplitStringUsing("cd,", ',', &v);
  ASSERT_EQ(2, v.size());
  EXPECT_EQ("cd", v[0]);
  EXPECT_EQ("", v[1]);
}
